import 'package:flutter/material.dart';
import 'package:hong_vpn_new_20240626/ui/setting/setting_cell.dart';
import 'package:hong_vpn_new_20240626/utils/global.dart';
import 'package:hong_vpn_new_20240626/utils/zz_navigator.dart';

import '../../utils/customs/app_webview.dart';

class SettingWidget extends StatefulWidget {
  const SettingWidget({super.key});

  @override
  State<SettingWidget> createState() => _SettingWidgetState();
}

class _SettingWidgetState extends State<SettingWidget> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Setting")),
      body: ListView(
        children: [
          SettingCell(
            title: "Privacy Policy",
            onTap: () => ZZNavigator.push(
              widget: AppWebWidget(
                Global.privacyUrl,
                title: "Privacy Policy",
                isShowBottomAction: false,
              ),
            ),
          ),
          SettingCell(
            title: "Terms of Service",
            onTap: () => ZZNavigator.push(
              widget: AppWebWidget(
                Global.serviceUrl,
                title: "Terms of Service",
                isShowBottomAction: false,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
